<!DOCTYPE html>
<html>
<#include "/views/ftl/base/manager_include.ftl">
<script type="text/javascript" src="${basePath}js/My97DatePicker/WdatePicker.js"></script>
<base href="${basePath}">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>用户列表</title> 
<script type="text/javascript" charset="utf-8" src="ueditor/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="ueditor/ueditor.all.min.js"> </script> 
<script type="text/javascript" charset="utf-8" src="ueditor/lang/zh-cn/zh-cn.js"></script> 
</head>
<body style="background:#eef3f7;">
<#include "/views/ftl/base/head.ftl"> 
<div class="Main">
  <div class="dw">
<#include "/views/ftl/base/menu.ftl">
<#function a><#return "添加新闻分类_List"></#function> 

  <!--右边内容-->
      <div class="Rightbox fl">
        <!--面包屑-->
        <div class="Bread_crbs clear">
          <div class="Bread_crbs_img fl"></div>
          <div class="Bread_crbs_text fl"><a href="javascript:;"><span>内容管理</span></a><span class="fnt_famy">></span><a href="javascript:;"><span>新增内容版块</span></a></div>
        </div>
         
        <!--各种表单设置-->
        <div class="bd_box"> 
          <div class="input_name">
            <span>版块名称:  </span><input type="text" name="modulesName" placeholder="请输入内容版块名称" value='' /><span>&nbsp;&nbsp;如:帮助,新闻,问题中心</span>
          </div><br> 
          <div class="input_name"  style="display:none;">
            <span>自定义URI:</span><input type="text" name="customId" placeholder="请输入内容版块名称" value='' /><span>可用此URI访问列表,不填,默认id</span>
          </div><br>
          <div class="input_name"><span>是否显示:</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
				<select name="isEnable" class="St">
					<option value="1">显示</option> 
					<option value="0">不显示</option> 
				</select>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
			</div>
        <div class="button">
           <a id='submit_form' href="javascript:void(0);"><input class="myPointer"  type="button" name="button" value="保存" /></a>
        </div>
   </div></div>  
</div></div>

<script type="text/javascript">
$(function(){
	
	$('#submit_form').click(function(){
		var modulesName=$('input[name=modulesName]').val();
		var customId =$('input[name=customId]').val(); 
		var isEnable = $('select[name=isEnable]').val();
		 
		 $.ajax({
				url : '${basePath}manager/NewsModules_plusNewsModules', 
				data : {
					 modulesName : modulesName,
					 customId : customId,
					 isEnable : isEnable 
				},
				dataType : "JSON",
				async : true,
				cache : false,  
				type  : "POST",
				success : function(data) { 
					if(1==data.code){
						 if(confirm("添加成功,是否继续添加？")){
							 window.location.reload();
						 }else{
							 window.location.href="${basePath}manager/NewsModules_newsModulesList";
						 } 
					}else{
						alert(data.msg);
					}
				}
		});
		
	});
});
</script>
</body>
</html>